<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>宝宝档案</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="/resources/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/resources/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <script src="/resources/js/echarts.min.js"></script>
    <link rel="stylesheet" href="/resources/css/amazeui.min.css" />
    <link rel="stylesheet" href="/resources/css/amazeui.datatables.min.css" />
    <link rel="stylesheet" href="/resources/css/app.css">
    <script src="/resources/js/jquery.min.js"></script>

</head>

<body data-type="widgets">
    <script src="/resources/js/theme.js"></script>
    <div class="am-g tpl-g">

        <%--头部开始--%>
        <%@include file="header.jsp" %>
        <%--头部结束--%>

        <!-- 内容区域 -->
        <div class="tpl-content-wrapper">
            <div class="row-content am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">

                            <div class="container-fluid am-cf">
                                <div class="row">
                                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
                                        <div class="page-header-heading"><span class="am-icon-file-o page-header-heading-icon"></span> 宝宝档案管理
                                            <small>Baby file management</small>
                                        </div>
                                        <p class="page-header-description">对宝宝档案进行增加、修改、删除、等操作。</p>
                                    </div>
                                    <div class="am-u-lg-3 tpl-index-settings-button">
                                        <%--<button type="button" class="page-header-button"><span class="am-icon-paint-brush"></span> 设置</button>--%>
                                    </div>
                                </div>
                            </div>

                            <div class="widget-body  am-fr">
                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                                    <div class="am-form-group">
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs">
                                                <button
                                                        type="button"
                                                        class="am-btn am-btn-default am-btn-success"
                                                        data-am-modal="{target: '#formModel', width: 900}"
                                                        onclick="clearBtn();">
                                                    <span class="am-icon-plus"></span> 添加档案
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- 右上角搜索框 -->
                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                                    <div class="am-form-group tpl-table-list-select">
                                        <select data-am-selected="{btnSize: 'sm'}">
                                            <option value="option1">所有类别</option>
                                            <option value="option2">IT业界</option>
                                            <option value="option3">数码产品</option>
                                            <option value="option3">笔记本电脑</option>
                                            <option value="option3">平板电脑</option>
                                            <option value="option3">只能手机</option>
                                            <option value="option3">超极本</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="am-u-sm-12 am-u-md-12 am-u-lg-3">
                                    <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                                        <input type="text" class="am-form-field ">
                                        <span class="am-input-group-btn">
                                            <button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search" type="button"></button>
                                          </span>
                                    </div>
                                </div>

                                <!-- 右侧表格开始 -->
                                <div class="am-u-sm-12">

                                    <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black">
                                        <thead>
                                            <tr>
                                                <th class="am-text-center">档案编号</th>
                                                <th class="am-text-center">用户ID</th>
                                                <th class="am-text-center">宝宝ID</th>
                                                <th class="am-text-center">就诊日期</th>
                                                <th class="am-text-center">状态</th>
                                                <th class="am-text-center">主要症状</th>
                                                <%--<th class="am-text-center">其他症状</th>
                                                <th class="am-text-center">诊断结果</th>
                                                <th class="am-text-center">备注</th>--%>
                                                <th class="am-text-center">操作</th>
                                            </tr>
                                        </thead>
                                        <tbody class="am-text-center">
                                            <c:forEach items="${illCaseList }" var="i">
                                                <tr>
                                                    <td>${i.illCaseNo }</td>
                                                    <td>${i.userId }</td>
                                                    <td>${i.babyId }</td>
                                                    <td>
                                                        ${fn:substring(i.visitDate, 0, 10)}
                                                    </td>
                                                    <td>
                                                        <c:choose>
                                                            <c:when test="${i.illCaseState == 0}">待诊断</c:when>
                                                            <c:when test="${i.illCaseState == 1}">诊断完成</c:when>
                                                            <c:when test="${i.illCaseState == 2}">进入会诊</c:when>
                                                            <c:when test="${i.illCaseState == 3}">会诊完成</c:when>
                                                        </c:choose>
                                                    </td>
                                                    <td>${i.sysmptom }</td>
                                                    <%--<td>${i.otherSysmp }</td>
                                                    <td>${i.visit }</td>
                                                    <td>${i.illCaseNote }</td>--%>
                                                    <td>
                                                        <button type="button" class="am-btn am-btn-xs am-btn-secondary" onclick="editEmpFun('${i.illCaseId }')" data-am-modal="{target: '#formModel', width: 900}">
                                                            <span class="am-icon-eye"></span> 查看
                                                        </button>
                                                        <button type="button" class="am-btn am-btn-xs am-btn-danger" onclick="delEmpFun('${i.illCaseId }')">
                                                            <span class="am-icon-trash-o"></span> 删除
                                                        </button>
                                                    </td>
                                                </tr>
                                            </c:forEach>
                                        <!-- more data -->
                                        </tbody>
                                    </table>
                                </div>
                                <!-- 右侧表格结束 -->

                                <!-- 分页开始 -->
                                <div class="am-u-lg-12 am-cf">
                                    <div class="am-fr">
                                        <ul class="am-pagination tpl-pagination">
                                            <li class="am-disabled"><a href="#">«</a></li>
                                            <li class="am-active"><a href="#">1</a></li>
                                            <li><a href="#">2</a></li>
                                            <li><a href="#">3</a></li>
                                            <li><a href="#">4</a></li>
                                            <li><a href="#">5</a></li>
                                            <li><a href="#">»</a></li>
                                        </ul>
                                    </div>
                                </div>
                                <!-- 分页结束 -->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 模态框开始 -->
        <div class="am-modal am-modal-no-btn" tabindex="-1" id="formModel">
            <div class="am-modal-dialog">
                <div class="am-modal-bd" style="padding: 1px;">
                    <div class="row">
                        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                            <div class="widget am-cf" style="margin: 0;">
                                <div class="widget-head am-cf">
                                    <div class="widget-title am-fl"><h2>宝宝档案</h2></div>
                                    <div class="widget-function am-fr">
                                        <a href="javascript: void(0)" class="am-close am-close-spin clearForm">&times;</a>
                                    </div>
                                </div>
                                <div class="widget-body am-fr">
                                    <form class="am-form tpl-form-border-form tpl-form-border-br" id="infoForm">

                                        <!-- id -->
                                        <div class="am-form-group am-hide">
                                            <label class="am-u-sm-3 am-form-label">ID</label>
                                            <div class="am-u-sm-6">
                                                <input type="text" name="illCaseId" class="tpl-form-input illCaseId">
                                            </div>
                                            <div class="am-u-sm-3">
                                            </div>
                                        </div>

                                        <!-- userId -->
                                        <div class="am-form-group">
                                            <label class="am-u-sm-3 am-form-label">用户ID</label>
                                            <div class="am-u-sm-6">
                                                <input type="text" name="userId" class="am-form-field tpl-form-no-bg userId" placeholder="请输入用户ID（数字）">
                                            </div>
                                            <div class="am-u-sm-3">
                                                <small class="tipuserId">此项为必填项！</small>
                                            </div>
                                        </div>

                                        <!-- 宝宝ID -->
                                        <div class="am-form-group">
                                            <label class="am-u-sm-3 am-form-label">宝宝ID</label>
                                            <div class="am-u-sm-6">
                                                <input type="text" name="babyId" class="am-form-field tpl-form-no-bg babyId" placeholder="请输入宝宝ID（数字）">
                                            </div>
                                            <div class="am-u-sm-3">
                                                <small class="tipbabyId">此项为必填项！</small>
                                            </div>
                                        </div>

                                        <!-- 病例编号 -->
                                        <%--<div class="am-form-group">
                                            <label class="am-u-sm-3 am-form-label">病例编号</label>
                                            <div class="am-u-sm-6">
                                                <input type="text" name="illCaseNo" class="tpl-form-input illCaseNo" placeholder="请输入病例编号（数字）">
                                            </div>
                                            <div class="am-u-sm-3">
                                                <small class="tipillCaseNo">此项为必填项！</small>
                                            </div>
                                        </div>--%>

                                        <!-- 就诊日期 -->
                                        <div class="am-form-group">
                                            <label class="am-u-sm-3 am-form-label">就诊日期</label>
                                            <div class="am-u-sm-6">
                                                <div class="am-input-group am-datepicker-date" data-am-datepicker="{format: 'yyyy-mm-dd', viewMode: 'years'}">
                                                    <input type="text" class="am-form-field visitDate" name="visitDate" placeholder="请选择就诊日期">
                                                    <span class="am-input-group-btn am-datepicker-add-on">
                                                        <button class="am-btn am-btn-default" type="button">
                                                            <span class="am-icon-calendar"></span>
                                                        </button>
                                                    </span>
                                                </div>
                                            </div>
                                            <div class="am-u-sm-3">
                                                <small class="tipvisitDate">此项为必填项！</small>
                                            </div>
                                        </div>

                                        <!-- 病例状态 -->
                                        <div class="am-form-group">
                                            <label class="am-u-sm-3 am-form-label">病例状态</label>
                                            <div class="am-u-sm-6">
                                                <div class="am-form-group">
                                                    <label class="am-radio-inline">
                                                        <input type="radio" name="illCaseState" class="illCaseState" value="0" checked="checked"> 待诊断
                                                    </label>
                                                    <label class="am-radio-inline">
                                                        <input type="radio" name="illCaseState" class="illCaseState" value="1"> 诊断完成
                                                    </label>
                                                    <label class="am-radio-inline">
                                                        <input type="radio" name="illCaseState" class="illCaseState" value="2"> 进入会诊
                                                    </label>
                                                    <label class="am-radio-inline">
                                                        <input type="radio" name="illCaseState" class="illCaseState" value="3"> 会诊完成
                                                    </label>
                                                </div>
                                            </div>
                                            <div class="am-u-sm-3">
                                                <small style="color: green">√</small>
                                            </div>
                                        </div>

                                        <!-- 主要症状 -->
                                        <div class="am-form-group">
                                            <label class="am-u-sm-3 am-form-label">主要症状</label>
                                            <div class="am-u-sm-6">
                                                <input type="text" name="sysmptom" class="am-form-field tpl-form-no-bg sysmptom" placeholder="请输入症状">
                                            </div>
                                            <div class="am-u-sm-3">
                                                <small class="tipsysmptom">此项为必填项！</small>
                                            </div>
                                        </div>

                                        <%-- 诊断结果 --%>
                                        <div class="am-form-group">
                                            <label class="am-u-sm-3 am-form-label">诊断结果</label>
                                            <div class="am-u-sm-6">
                                                <textarea rows="5" name="visit" class="visit" placeholder="请输入诊断结果"></textarea>
                                            </div>
                                            <div class="am-u-sm-3">
                                                <small class="tipvisit">此项为必填项！</small>
                                            </div>
                                        </div>

                                        <!-- 其他症状 -->
                                        <div class="am-form-group">
                                            <label class="am-u-sm-3 am-form-label">其他症状</label>
                                            <div class="am-u-sm-6">
                                                <input type="text" name="otherSysmp" class="am-form-field tpl-form-no-bg otherSysmp" placeholder="其他待观察的症状">
                                            </div>
                                            <div class="am-u-sm-3">
                                                <small class="tipotherSysmp"></small>
                                            </div>
                                        </div>

                                        <!-- 备注 -->
                                        <div class="am-form-group">
                                            <label class="am-u-sm-3 am-form-label">备注</label>
                                            <div class="am-u-sm-6">
                                                <textarea rows="6" name="illCaseNote" class="illCaseNote" placeholder="请输入备注"></textarea>
                                            </div>
                                            <div class="am-u-sm-3">
                                                <small class="tipillCaseNote"></small>
                                            </div>
                                        </div>

                                        <!-- 按钮 -->
                                        <div class="am-form-group">
                                            <div class="am-u-sm-12">
                                                <button type="button" class="am-btn am-btn-secondary tpl-btn-bg-color-success clearForm"><i class="am-icon-close"></i> 取消</button>
                                                <button type="button" class="am-btn am-btn-success tpl-btn-bg-color-success" id="updateBtn" onclick="updateEmpFun();"><i class="am-icon-floppy-o"></i> 更新</button>
                                                <button type="button" class="am-btn am-btn-success tpl-btn-bg-color-success" id="submitFormBtn"><i class="am-icon-floppy-o"></i> 新增</button>
                                            </div>
                                        </div>

                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 整个表单结束 -->
                </div>
            </div>
        </div>
        <!-- 模态框结束 -->

        <!-- 删除员工提示警告框开始 -->
        <div class="am-modal am-modal-confirm" tabindex="-1" id="delConfirm">
            <div class="am-modal-dialog">
                <div class="am-modal-hd">删除警告</div>
                <div class="am-modal-bd">
                    您，确定要删除这条记录吗？
                </div>
                <div class="am-modal-footer">
                    <span class="am-modal-btn" data-am-modal-cancel>取消</span>
                    <span class="am-modal-btn" data-am-modal-confirm>确定</span>
                </div>
            </div>
        </div>
        <!-- 删除员工提示警告框结束 -->

    </div>

    <script src="/resources/js/amazeui.min.js"></script>
    <script src="/resources/js/amazeui.datatables.min.js"></script>
    <script src="/resources/js/dataTables.responsive.min.js"></script>
    <script src="/resources/js/app.js"></script>
    <script src="/resources/js/app.js"></script>
    <script src="/resources/jsutlis/fileutli.js"></script>
    <script src="/resources/js/illCase.form.validation.js"></script>

</body>

</html>